<template>
  <div class="container">
    <div>慧用劵</div>
    <div class="content">
      <div class="list">
        <div
          v-for="(item, index) in projectList"
          :key="item + index"
          @click="goPageHub(item)"
        >
          <el-button type="primary"
            >{{ index + 1 }} . {{ item.pageName }}</el-button
          >
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import projectList from "@/common/projectList";

export default {
  name: "pageHome",
  data() {
    return {
      projectList: projectList.data,
    };
  },
  created() {},
  methods: {
    goPageHub(val) {
      console.log(val);
      let goUrl = `${process.env.VUE_APP_SRC}`;
      if (val) {
        goUrl = `${goUrl}/pageHub?action=${val.pageActive}`;
      }
      window.location.href = goUrl;
    },
  },
};
</script>

<style lang="less" scoped>
.container {
  width: 100%;
  .content {
    width: 100%;
    padding-top: 50px;
    box-sizing: border-box;
    .list {
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
    }
  }
}
</style>
